package com.test.spring.计划任务;

import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;

@Service
public class ScheduledTaskService {
	private static SimpleDateFormat simpleDateFormat =
			new SimpleDateFormat("HH:mm:ss");

//	@Autowired
//	private JedisConnectionFactory jedisConnectionFactory;
//	@Autowired
//	private RedisConnectionFactory redisConnectionFactory;
//	@Scheduled(fixedRate = 50000)
//	public void test1() {
//		System.out.println("每隔50s执行一次"+simpleDateFormat.format(new Date()));
//		JedisConnectionFactory jedisConnectionFactory = (JedisConnectionFactory) redisConnectionFactory;
//		String hostName = jedisConnectionFactory.getHostName();
//		System.out.println("hostName = " + hostName);
//		GenericObjectPoolConfig poolConfig = jedisConnectionFactory.getPoolConfig();
//		int maxIdle = poolConfig.getMaxIdle();
//		System.out.println("maxIdle = " + maxIdle);
//	}
}
